ReadCounter Method

Otherwise known as the manual mode, this single method invocation can read a remote PerfMon statistic from the specified server. The same statistic reading routine is also used internally within the automatic mode to gather readings from multiple servers on a repetitive basis. ReadCounter is useful for troubleshooting purposes if it is unclear whether the remote server is accessible from the source location. See the Visual Basic sample client "Readperf.exe" for a usage example.

Syntax

ReadCounter(String szServerName, String szObjectName, String szCounterName, Long lpdwValue)

Parameters

szServerName
Target server. Examples: "Myserver" and "."
szObjectName
Perfmon object. Example: "HTTP Service"
szCounterName
Perfmon counter. Example: "Current Connections"
lpdwValue
Return counter value. Negative values represent errors.

Applies To

Load Balancer